#include "bus.h"
// defined in include/asm-arm926/setup.h
#define COMMAND_LINE_SIZE 1024
struct param_struct {
    union {
	struct {
	    unsigned long page_size;		/*  0 */
	    unsigned long nr_pages;		/*  4 */
	    unsigned long ramdisk_size;		/*  8 */
	    unsigned long flags;		/* 12 */
#define FLAG_READONLY	1
#define FLAG_RDLOAD	4
#define FLAG_RDPROMPT	8
	    unsigned long rootdev;		/* 16 */
	    unsigned long video_num_cols;	/* 20 */
	    unsigned long video_num_rows;	/* 24 */
	    unsigned long video_x;		/* 28 */
	    unsigned long video_y;		/* 32 */
	    unsigned long memc_control_reg;	/* 36 */
	    unsigned char sounddefault;		/* 40 */
	    unsigned char adfsdrives;		/* 41 */
	    unsigned char bytes_per_char_h;	/* 42 */
	    unsigned char bytes_per_char_v;	/* 43 */
	    unsigned long pages_in_bank[4];	/* 44 */
	    unsigned long pages_in_vram;	/* 60 */
	    unsigned long initrd_start;		/* 64 */
	    unsigned long initrd_size;		/* 68 */
	    unsigned long rd_start;		/* 72 */
	    unsigned long system_rev;		/* 76 */
	    unsigned long system_serial_low;	/* 80 */
	    unsigned long system_serial_high;	/* 84 */
	    unsigned long mem_fclk_21285;       /* 88 */
	} s;
	char unused[256];
    } u1;
    union {

	struct {
	    unsigned long magic;
	    char n[1024 - sizeof(unsigned long)];
	} s;
	char paths[8][128];
    } u2;
    char commandline[COMMAND_LINE_SIZE];
};


struct param_struct  params=
{
 //   union {
	{	//struct {
	0x1000,//    unsigned long page_size;		/*  0 */
	0x8000,//    unsigned long nr_pages;		/*  4 */
	0,//    unsigned long ramdisk_size;		/*  8 */
	0,//    unsigned long flags;		/* 12 */
	0,//    unsigned long rootdev;		/* 16 */
	0,//    unsigned long video_num_cols;	/* 20 */
	0,//    unsigned long video_num_rows;	/* 24 */
	0,//    unsigned long video_x;		/* 28 */
	0,//    unsigned long video_y;		/* 32 */
	0,//    unsigned long memc_control_reg;	/* 36 */
	0,//    unsigned char sounddefault;		/* 40 */
	0,//    unsigned char adfsdrives;		/* 41 */
	1,//    unsigned char bytes_per_char_h;	/* 42 */
	1,//    unsigned char bytes_per_char_v;	/* 43 */
	{0},//    unsigned long pages_in_bank[4];	/* 44 */
	0x800,//    unsigned long pages_in_vram;	/* 60 */
	0,//    unsigned long initrd_start;		/* 64 */
	0,//    unsigned long initrd_size;		/* 68 */
	0,//    unsigned long rd_start;		/* 72 */
	0x3650000,//    unsigned long system_rev;		/* 76 */
	0,//    unsigned long system_serial_low;	/* 80 */
	0,//    unsigned long system_serial_high;	/* 84 */
	0//    unsigned long mem_fclk_21285;       /* 88 */
	},//} s;
	//char unused[256];
 //   } u1;
 //   union {

	{//struct {
	0,//    unsigned long magic;
	0//    char n[1024 - sizeof(unsigned long)];
	},//} s;
	//char paths[8][128];
 //   } u2;
 "mem=32m console=/dev/ttyAS0"//   char commandline[COMMAND_LINE_SIZE];

};

void setup_boot()
{
	bus_write_bytes(0x80000100,(__u8 *)&params,sizeof(params));

}